$OpenBSD: patch-src_tools_qvaluelist_h,v 1.3 2007/03/31 22:49:46 espie Exp $
--- src/tools/qvaluelist.h.orig	Thu Oct 19 16:25:01 2006
+++ src/tools/qvaluelist.h	Sat Mar 31 14:51:25 2007
@@ -638,13 +638,11 @@ Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStrea
     l.clear();
     Q_UINT32 c;
     s >> c;
-    for( Q_UINT32 i = 0; i < c; ++i )
+    for( Q_UINT32 i = 0; i < c && !s.atEnd(); ++i )
     {
 	T t;
 	s >> t;
 	l.append( t );
-	if ( s.atEnd() )
-	    break;
     }
     return s;
 }
